package com.yc.bos.web.action;

import com.yc.bos.model.Noticebill;
import com.yc.bos.service.INoticebillService;
import com.yc.bos.web.action.base.BaseAction;
import com.gyf.crm.domain.Customer;
import com.gyf.crm.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.IOException;

public class NoticebillAction  extends BaseAction<Noticebill>{
  @Autowired
  private CustomerService customerService;
    @Autowired
    private INoticebillService noticebillService;

   private String tel;//电话
    public void setTel(String tel) {
        this.tel = tel;
    }

    private String decidedzoneId;
    public void setDecidedzoneId(String decidedzoneId) {
        this.decidedzoneId = decidedzoneId;
    }

    public void findCustomerByTel() throws IOException {
        System.out.println(tel);
        Customer customer=customerService.findCustomerByTel(tel);
        responseJson(customer,new String[]{});
    }


    @Override
    public String save() {
        System.out.println(decidedzoneId);
        noticebillService.save(getModel(),decidedzoneId);
        return NONE;
    }

    @Override
    public String update() {
        return null;
    }

    @Override
    public String delete() throws IOException {
        return null;
    }

    @Override
    public String list() {
        return null;
    }

}
